[WIP] Use Task.Run instead ThreadPool.QueueUserWorkItem#18
[WIP] Use Task.Run instead ThreadPool.QueueUserWorkItem#18
Conversation
|
Some progress. I was able to have a working POC: I basically compiled oniguruma using emcc: and included the native references into the WebAssembly project as However, I have no idea about how to generate a nuget for TextmateSharp supporting wasm. Issues:
|
I'm a total beginner with web assembly so I can't speak from experience, but there are a few docs at https://learn.microsoft.com/en-us/aspnet/core/blazor/webassembly-native-dependencies?view=aspnetcore-6.0#package-native-dependencies-in-a-nuget-package about how it might be done, and I've seen mention elsewhere of using the 'browser-wasm' identifier to include the binaries in a nuget package. From the links on tha MS article, there is a 'SkiaSharp.NativeAssets.WebAssembly' package that contains the Wasm build of Skia, and a 'SkiaSharp.Views.Blazor' which contains MSBuild files which add the 'NativeFileReference' entries for the .a files, which might be an example of how the properties can be set up? |
|
Yes, I tried this here, with no luck. Not sure if here I need to add the
|
|
There's a note in that MS documentation that says So I don't know if distributing the .wasm file is safe there? For (2), Can you put a TextMateSharp.props file inside the 'build' directory in the nuget package which contains the (However, I'm not sure what the conditions and such should be to control when it's included) |
|
So it seems I need to ship these two files in the nuget... I only need to ship them for Honestly...im not sure about the syntax to do that docs are not very verbose. |
|
I'll discard this PR. |
|
For the threading issue, it seems that is going to be supported in .net 7 via WasmEnableThreads ... |


Fixes #9